﻿namespace MefContrib.Models.Provider
{
    using System;

    /// <summary>
    /// Defines the capabilities an object factory must conform to.
    /// </summary>
    public abstract class ObjectFactory
    {
        /// <summary>
        /// Creates a new instance of the specifed type using the provided parameters.
        /// </summary>
        /// <param name="type">The type of the object to create.</param>
        /// <param name="parameters">The parameters which should be passed to the new instance when it is being created.</param>
        /// <returns>A new object instance of the type specified by the <paramref name="type"/> parameter.</returns>
        public abstract object Create(Type type, params object[] parameters);
    }
}